package net.jonbuck.tassoo.eventmanager.events;

import net.jonbuck.tassoo.eventmanager.exception.UnsupportedListenerException;
import net.jonbuck.tassoo.eventmanager.listener.TypesUpdatedEventListener;

/**
 * <p>
 * <b>Event is fired when the list of <em>Types</em> is updated.</b>
 * </p>
 * 
 * @since 1.0.0
 */
public class TypesUpdatedEvent implements TassooEvent {

	/**
	 * 
	 */
	public void dispatchEvent(Object listener) {
		if (listener instanceof TypesUpdatedEventListener) {
			final TypesUpdatedEventListener eventListener = (TypesUpdatedEventListener) listener;
			eventListener.processTypesUpdatedEvent();
		} else {
			throw new UnsupportedListenerException("", "Message");
		}
	}

}
